#include <cstdint>
#include <iostream>
#include <vector>

using ll = int64_t;
using std::cin, std::cout;

const ll maxn = 1e5+5;
ll n, size[maxn];
std::vector<ll> adj[maxn];

void initsize(const ll &fth, const ll &now){
    size[now]=1;
    for(auto &nxt: adj[now]){
        if(nxt==fth)continue;
        size[now]+=size[nxt];
    }
}

int main(){
    std::iostream::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);

    cin>>n;
    for(ll i{1}; i<n; i++){
        ll u, v;
        cin>>u>>v;
        adj[u].push_back(v);
    }
    initsize(0, 1);

    for(ll i{1}; i<=n; i++){
        
    }
}